import request from '@/utils/request'

//查询资讯
export function getInformation(data) {
  return request({
    url: '/system/notice/list',
    method: 'get',
	data: data
  })
}
//查询轮播图
export function getswiperList(data) {
  return request({
    url: '/jdkj/swiper/listAll',
    method: 'get',
	data: data
  })
}
//查询活动列表
export function getActiveList(data) {
  return request({
    url: '/jdkj/activity/list',
    method: 'get',
	data: data
  })
}
//查询活动项目
export function getProjectData(id) {
  return request({
    url: '/jdkj/types/getRaceDetails/'+id,
    method: 'get'
  })
}
//查询活動組
export function getCategoriesListAll(data) {
  return request({
    url: '/jdkj/categories/listAll',
    method: 'get',
	data: data
  })
}
//查询加購商品
export function getProducts(data) {
  return request({
    url: '/jdkj/product/list',
    method: 'get',
	data: data
  })
}
//查询vipCode
export function getVipCode(data) {
  return request({
    url: '/system/user/getVipCode',
    method: 'get',
	data: data
  })
}
export function addOrder(data) {
  return request({
    url: '/jdkj/detail/add',
    method: 'post',
    data: data
  })
}

export function orderList(data) {
  return request({
    url: '/jdkj/detail/list',
    method: 'get',
    data: data
  })
}

// 创建订单
export function createOrder(data) {
  return request({
    url: '/api/payment/create',
    method: 'post',
    data
  })
}

// 获取支付结果
export function getPaymentResult(data) {
  return request({
    url: '/api/payment/result',
    method: 'post',
    data
  })
}
// 新建志願者申請
export function addVolunteer(data) {
  return request({
    url: '/jdkj/volunteer/add',
    method: 'post',
    data:data
  })
}

// 获取订单详情
export function getOrderDetail(id) {
    return request({
        url: '/jdkj/detail/getInfo/' + id,
        method: 'get'
    })
}

// 修改订单
export function updateOrderDetail(data) {
    return request({
        url: '/jdkj/detail/edit/',
        method: 'post',
		data:data
    })
}